package system.bean;

import java.util.Collection;
import java.util.Vector;

import util.ORProperty;
import util.ObjectRelationMappable;
import util.ObjectRelationMappingUtil;

public class Role implements ObjectRelationMappable {

	private int roleId;
	private String title;
	private String identify;
	private String comment;
	
	public final static String  tableName = "roles";
	private final static Vector<Role> orProperties = new Vector<Role>();
	
	private static void initORProperties(Role role){
		if (orProperties.size() > 0)return;
        ObjectRelationMappingUtil.addORProperty("roleId", false,	 ORProperty.FIELD_TYPE_INT, "roleId", true, orProperties);
        ObjectRelationMappingUtil.addORProperty(role, "title"     , "title"     , orProperties);
        ObjectRelationMappingUtil.addORProperty(role, "identify" , "identify" , orProperties);
        ObjectRelationMappingUtil.addORProperty(role, "comment"    , "comment"    , orProperties);
	}
	
	public Role(){
		initORProperties(this);
	}
	
	@Override
	public Collection<Role> getORProperties() {
		return orProperties;
	}

	@Override
	public String getTableName() {
		return tableName;
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIdentify() {
		return identify;
	}

	public void setIdentify(String identify) {
		this.identify = identify;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
